﻿using Approval.Domain;
using Approval.ReadAPI.Appliaction.Command.HCTReationCommand;
using MediatR;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;

namespace Approval.ReadAPI.Controllers
{
    [Route("api/[controller]/[action]")]
    [ApiController]
    public class HCTReationController : ControllerBase
    {
        private readonly IMediator mediator;

        public HCTReationController(IMediator mediator)
        {
            this.mediator = mediator;
        }

        /// <summary>
        /// 审批合同关系列表
        /// </summary>
        /// <param name="command"></param>
        /// <returns></returns>
        [HttpGet]
        public async Task<List<HCTRelation>> GetHCTReationList([FromQuery]HCTReationListCommand command)
        {
            return await mediator.Send(command);
        }

    }
}
